home *** CD-ROM | disk | FTP | other *** search
- /* MyApp.h
- *
- * This declares my application core, which allows me to handle
- * the new menu commands
- */
-
- #ifndef __MYAPP_H__
- #define __MYAPP_H__
-
- #include <stdio.h>
- #include <XApplication.h>
- #include <XView.h>
- #include <XDynArray.h>
-
- /************************************************************************/
- /* */
- /* Application Core */
- /* */
- /************************************************************************/
-
- /* TMyApp
- *
- * This creates a multiwindow application to open text windows
- */
-
- class TMyApp : public XGAppMultiWindow, XGViewFactory {
- public:
- TMyApp();
- virtual ~TMyApp();
-
- long ReceiveDispatch(long,long,void *);
- virtual XGView *CreateView(long viewID, XGView *parent, XGArgStream &);
- private:
- void DoOpenWindow();
- };
-
- /************************************************************************/
- /* */
- /* Text Display View */
- /* */
- /************************************************************************/
-
- /* TTextView
- *
- * This is my display view
- */
-
- class TTextView : public XGView {
- public:
- TTextView(XGView *parent, XGArgStream &s);
- virtual ~TTextView();
-
- /*
- * Set the view and display
- */
-
- void ShowFile(FILE *);
- void DoDrawView(Rect);
- void DoSizeView();
-
- private:
- void RecalcScroll();
- FILE *fFile;
- XGDynArray<long> fStart;
- };
-
- #endif // __MYAPP_H__
-